Algorithm Builder

1. How do I create algorithms?

Workspaces => Add Workspace =>Add Change => type - create new => select change type as Computations.

2. What is the best way to create algorithms?

The best way to create an algorithm is by segregating the algorithm logic into different block.

3. What is the significance of main block?

The main block acts as the Pricer for the algorithm. Main block gets invoked by default when the algorithm is invoked in Pricer.

4. Should I invoke all the blocks in Pricer?

It is not necessary to invoke all the blocks in a Pricer. Rule blocks created in the algorithm can be invoked in any of the blocks and if that block is invoked it will serve the purpose. However if you have invoked them in the main block. Invoking of the main block is handled by the system.

5. What is the scope of the local variables?

The scope of local variables is with in a block. Any values assigned for a local variable can be used only with the block. These will not be visible in other blocks.

6. What is the scope of the global variables?

Variables created or the values assigned, can be used any algorithms across the product regardless of the context.

7. What happens if I map wrong attributes to rate table?

When invoked, if the proper inputs are not passed into the rate table, execution fails. However system only restricts if the data type doesn’t match.

8. What happens if I calculate the premium values to other than premium attribute?

The algorithm would not get verified if wrong attributes are mapped to the rate table.

9. What is the significance of common rating, premium, other computation algorithms?

Common rating algorithm is used to derive any logic required for premium calculations but cannot be used calculating premiums of an entity.

Premium calculation Algorithm is used to calculate the premium of a certain entity.

Premium calculations/ Rollups are the algorithms that should be created only if the premium derivation of an entity."

10. Can I invoke function with in a function?

No. iFoundry does not support this.

11. How context must be chosen for an algorithm?

To make APRP logic available out of the box, context of any algorithm should be the same entity is intended for.

Example: if the algorithm is intended for building coverage then context should be building coverage and not anything else like building, ;location.

However if you are not using APRP there is not restriction.

12. How do I use the attributes that do not belong to the selected context?

You will be able to select the attributes that do not belong to the selected context by making use of out of context.

13. Should I calculate only one attribute in a block?

No, Ideally it is advised to create different blocks for different return attributes value derivation. However, there is no restriction.

14. What happens if I delete a block?

You will not be able to use the logic defined in the deleted block any where else. If they are not removed that may lead to execution failure.

15. Can I avoid invoking rule blocks in the Pricer?

Yes, if you invoke them in the main block of the algorithm, you don’t have to invoke them in Pricer.

16. Can I invoke a block within the other block of same algorithm?

Yes, however you should invoke the block within the other blocks of same algorithm.

17. Can I invoke algorithm in another algorithm?

Yes. Provided you are aware of the context related complexities.

18. Can I invoke blocks of one algorithm in another algorithm?

Yes. Provided you are aware of the context related complexities.

19. What happens if I create a premium algorithm of coverage for which a different coverage is selected as context?

If you would like to use APRP functionalities, do not create algorithms in this way. If do not need APRP, you are can do so.

20. When and how looping logic(FORALL) must be written?

Looping logic is required when you right any logic on entities whose cardinality is set to be multiple.

To write looping logic algorithm must always be created at least one level above the required entity.

Example: If you want to loop on all the buildings to be added then logic must be at the location level.

21. How should a multi return rate table be mapped in the algorithm?

All the parameters must be passed in the rate table definition.

22. How do I get the values of an attribute to use while creating algorithms?

This can either be done by using the attributes directly provided the values are derived prior to this if its derived value. Or by just invoking the blocks where they are required.

23. What is path?

Path signifies an attribute is being used from parent levels of the entity.

24. How can I ensure to execute a logic only when related coverage is selected?

This is inbuilt in the engine. Engine ensures that a logic executes only if that entity is passed in the rating request.

25. What happens if I set a value to an attribute with a different datatype?

Values that do not match the attribute datatype should not be assigned. System restricts you do this.

26. When do I add a secondary context?

Secondary context is need when an entity which is not parent hierarchy.

Example: if you want to use any attribute which belong to the entity what is attached to a different entity which is not in its parent list then such entities can be added as secondary context.

27. When should I create global variable / local variable?

Global / local variables must be created only when you want hold a value temporarily but do not want to save it to schema.

28. How do I use a function Functions are available in the builder?

Upon invoking which you will see a syntax.

29. When do I use array functions or variables?

Array functions should be used when you want to list multiple values temporarily to a variable.

30. How do I know if I the logic written is correct?

Once the logic is written, you would able to verify is using very button with in the builder.

31. What can be invoked in Pricer?

Algorithms can be invoked into the Pricer.

32. How do invoke an algorithm in Pricer?

Once you create an Pricer, list of all the algorithms will be visible to the right of the builder. Upon tapping twice on it algorithm you will be able to invoke them.

33. What is the ideal way to invoke algorithms in Pricer?

Pricer must always be sequenced based on the information capture sequence by business use FORALL loops at all required places.

If Policy information is captured first and that is required for all the other location and building rating algorithms, then those algorithm must be invoked first.

Example :

Policy Derivation Algo

FORALL Location

LocationLogicDerivation

FORALL Building

Building Derivation Algo

Building Coverage

Business Property Coverage

Building Premium

ENDFORALL

Location Premium

ENDFORALL

Policy Premium

34. Can I delete default blocks of the algorithm?

No, Default blocks should be deleted.

35. Can I use rate tables created in other workspaces while defining an algorithm?

Yes, this can be done by selecting the workspace from which the rate tables need to be invoked.

36. What happens if I reset the algorithm data?

On Clicking Reset Data all the data in the algorithm will be lost.